<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head lang="en">
    <meta charset="UTF-8">
    <%@include file="style.jsp" %>
    <%@include file="script.jsp" %>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/orderlang/distributor/css/new_activity.css"/>
    <title>我的订货郎</title>
    <script type="text/javascript">
    	var activityType = "${activityType}";
    </script>
</head>
<body onselectstart="return false">
<div id="container_1" style="height:100%">
    <div style="position: relative">
        <%@include file="header.jsp" %>
    </div>
    <div id="content" class="clearfix">
        <%@include file="left_menu.jsp" %>
        <!--内容部分-->
        <div class="right-content" style="margin:75px 50px 0 213px;">
            <p class="brand">
                <a class="now">商品</a>><a href="${pageContext.request.contextPath}/productActivity/listActivity">商品促销</a>><a class="now">${activityType}</a>><a class="now">活动信息</a>
            </p>
            <div class="tab clearfix">
                <div class="msg active" id="msg" data-id="${productActivity.id}">活动信息</div>
                <div class="chose-product" id="chose-product" data-id="${productActivity.id}">添加活动商品</div>
                <div class="revise" id="revise" data-id="${productActivity.id}">修改活动价格</div>
            </div>
            <form class="msg-form" action="${pageContext.request.contextPath}/productActivity/updateProductActivity" method="post" enctype="multipart/form-data">
                <div class="content msg-block" style="height: 700px">
                    <div class="activity-msg">
                        <div style="height: 250px;">
                            <div class="title fl">
                                <span><s>*</s>活动标题</span>
                                <input type="text" name="title" placeholder="请输入活动标题" value="${productActivity.title}"/>
                                <input type="text" name="id" value="${productActivity.id} " style="display: none;"/>
                            </div>
                            <div class="customer-type fl">
                                <span><s>*</s>客户类型</span>
                                <label for="all" class="customer-all">全部</label>
                                <input type="checkbox" name="" id="all" value="all"/>
                                <c:forEach var="activityCustomerType" items="${distributorCustomerType}">
                                	<label for="common" class="customer-name">${activityCustomerType.type}</label>
                                	<input type="checkbox" name="customer-level" id="common" value="${activityCustomerType.id}"/>
                                </c:forEach>
                            </div>
                            <div class="date fl">
                                <span><s>*</s>开始时间/结束时间</span>
                                <input id="datePicker" type="text" readonly value="<fmt:formatDate value='${productActivity.startTime}'  pattern='yyyy-MM-dd'/> - <fmt:formatDate value='${productActivity.endTime}' pattern='yyyy-MM-dd'/>"/>
                                <input id="startdate" type="text" name="startTime" value="" style="display: none;"/>
                                <input id="enddate" type="text" name="endTime" value="" style="display: none;"/>
                            </div>
                            <div class="area fl">
                                <span><s>*</s>促销区域</span>
                                <select name="activityProvince" id="province" onchange="changeProvince()">
                                	<option value="0">全部省</option>
	                                <c:forEach items="${provincesList}" var="province">
	                                	<option value="${province.id }">${province.name }</option>
	                                </c:forEach>
                                </select>
                                <select name="activityCity" id="city">
									
                                </select>
                            </div>
                            <div class="description fl">
                                <span><s>*</s>活动描述</span>
                                <textarea name="description" id="" cols="93" rows="6">${productActivity.description}</textarea>
                            </div>
                        </div>
                        <div class="product-img" onclick="$('#img-upload').click()">
                            <img src="${pageContext.request.contextPath}/img/img-upload_03.jpg" id='yulanImg'/>
                        </div>
                        <input type="file" name="file" id="img-upload" style="display: none" onchange="changeName(this);"/>
                    </div>
                    <div class="fix-btn">
                        <input type="submit" class="submit" value="保存"/>
                        <input type="reset" id="reset" class="reset" value="取消"/>
                    </div>
                </div>
            </form>
            
            
        </div>
        <script src="${pageContext.request.contextPath}/static/orderlang/distributor/js/new_activity.js"></script>
        <!--内容部分结束-->
    </div>
</div>

</body>
</html>